﻿//===========================[ 7 / 6 / 2011 LVI ]=============================
//				Copyright c Vitaly Lyaschenko <SkyChameleon@gmail.com>
// 								Header file
// Purpose: включение общих для приложения заголовочных файлов, констант, 
// макросов...
//=============================================================================
#pragma once

#include <stdio.h>
#include <stdlib.h>

#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <iostream>
#include <sstream>
#include <fstream>

#include <cstdarg>
#include <assert.h>

typedef          char				_CHAR,         _8bit;  /* 8-bit,  1byte,   signed(–128  to  127 )         */
typedef unsigned char				_UCHAR, uchar, _8ubit; /*_|              unsigned( 0    to  255 )         */
typedef          wchar_t            _WCHAR, wchar;         /* 16-bit, 2byte, unsigned( 0    to  65,535 )      */
typedef          short				_SHORT,        _16bit; /* |                signed(–32,768  to  32,767 )   */
typedef unsigned short				_USHORT,ushort,_16ubit;/*_|              unsigned( 0       to  65,535 )   */
typedef          int   				_INT,          _32bit; /* 32-bit, 4byte,   signed(–2,147,483,648  to  2,147,483,647 )   */
typedef unsigned int   				_UINT,  uint,  _32ubit;/* |              unsigned( 0              to  4,294,967,295 )   */
typedef          long long          _DLONG, long2, _64bit; /* 64-bit, 8byte,   signed(–9,223,372,036,854,775,808  to  9,223,372,036,854,775,807 )   */
typedef unsigned long unsigned long _UDLONG,ulong2,_64ubit;/*_|              unsigned( 0                          to 18,446,744,073,709,551,615 )   */
typedef unsigned long ulong;

typedef float  _32float;
typedef double _64float;

#define ASSERT(x) assert(x)
//безопасное удаление объектов через макросы
#define SAFE_DELETE(X)		    if( X != NULL ) { delete   X; X = NULL; }
#define SAFE_DELETE_ARRAY(X)	if( X != NULL ) { delete[] X; X = NULL; }

template < class T >
void delete_pointed_to( T *p )
{
	delete p;
}